600
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('P1')) as EXTREELib_TLB.Column) do
	begin
		Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with (IUnknown(Columns.Add('P2')) as EXTREELib_TLB.Column) do
	begin
		Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
		FormatColumn := '1 index ``';
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child A');
		InsertItem(h,Null,'Child B');
		InsertItem(h,Null,'Child A');
		InsertItem(h,Null,'Child B');
		AddItem('Root');
		AddItem('Root');
	end;
	SingleSort := False;
	Layout := 'multiplesort="C0:1 C1:2";collapse=""';
	EndUpdate();
end
599
How can I get ride / hide the image being dragged by OLE Drag and Drop
// OLEStartDrag event - Occurs when the OLEDrag method is called.
procedure TForm1.Tree1OLEStartDrag(ASender: TObject; Data : IExDataObject;var AllowedEffects : Integer);
begin
	// Data.SetData("data to drag")
	with Tree1 do
	begin
		AllowedEffects := 1;
	end
end;

with Tree1 do
begin
	OLEDropMode := EXTREELib_TLB.exOLEDropManual;
	Background[EXTREELib_TLB.exDragDropAfter] := $ffffff;
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
end
598
How can I export checked items only

with Tree1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	with Columns do
	begin
		(IUnknown(Add('C1')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
		(IUnknown(Add('C2')) as EXTREELib_TLB.Column).FormatColumn := '1 index `A-Z`';
		(IUnknown(Add('C3')) as EXTREELib_TLB.Column).FormatColumn := '100 index ``';
	end;
	with Items do
	begin
		AddItem('Item 1');
		CellState[OleVariant(AddItem('Item 2')),OleVariant(0)] := 1;
		CellState[OleVariant(AddItem('Item 3')),OleVariant(0)] := 1;
	end;
	EndUpdate();
	OutputDebugString( 'Export CSV Checked Items Only:' );
	OutputDebugString( Export('','chk') );
end
597
How can I export a hidden column

with Tree1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	with Columns do
	begin
		Add('C1');
		with (IUnknown(Add('C2')) as EXTREELib_TLB.Column) do
		begin
			FormatColumn := '1 index `A-Z`';
			Visible := False;
		end;
		with (IUnknown(Add('C3')) as EXTREELib_TLB.Column) do
		begin
			FormatColumn := '100 index ``';
			Visible := False;
		end;
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	EndUpdate();
	OutputDebugString( 'Export CSV Hidden Columns (1,2):' );
	OutputDebugString( Export('','|1,2') );
end
596
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	DrawGridLines := EXTREELib_TLB.exRowLines;
	AutoDrag := EXTREELib_TLB.exAutoDragPositionAny;
	HasLines := EXTREELib_TLB.exSolidLine;
	Indent := 16;
	MarkSearchColumn := False;
	with Columns do
	begin
		with (IUnknown(Add('')) as EXTREELib_TLB.Column) do
		begin
			Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
			FormatColumn := '((1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 + `` :  (=:0 mid (1 + 1 + =:1) )  + `)` ) + ` ` + value';
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
	end;
	EndUpdate();
end
595
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	GridLineColor := RGB(190,190,190);
	DrawGridLines := EXTREELib_TLB.exRowLines;
	AutoDrag := EXTREELib_TLB.exAutoDragPositionAny;
	HasLines := EXTREELib_TLB.exSolidLine;
	Indent := 16;
	with Columns do
	begin
		Add('Default');
		with (IUnknown(Add('')) as EXTREELib_TLB.Column) do
		begin
			Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
			Def[EXTREELib_TLB.exCellPaddingRight] := OleVariant(4);
			AllowSizing := False;
			Width := 36;
			Position := 0;
			FormatColumn := '(1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =:' + 
	'1) ) ';
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
	end;
	EndUpdate();
end
594
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	DrawGridLines := EXTREELib_TLB.exRowLines;
	AutoDrag := EXTREELib_TLB.exAutoDragPositionAny;
	HasLines := EXTREELib_TLB.exSolidLine;
	Indent := 16;
	with Columns do
	begin
		Add('Default');
		with (IUnknown(Add('')) as EXTREELib_TLB.Column) do
		begin
			Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
			Def[EXTREELib_TLB.exCellPaddingRight] := OleVariant(4);
			Alignment := EXTREELib_TLB.RightAlignment;
			AllowSizing := False;
			Width := 24;
			Position := 0;
			FormatColumn := '(1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) ';
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
		ExpandItem[0] := True;
		h := AddItem('Root');
		InsertItem(h,Null,'Child');
		hChild := InsertItem(h,Null,'Child');
		CellState[OleVariant(hChild),OleVariant(0)] := 1;
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(hChild,Null,'Child');
		InsertItem(h,Null,'Child');
	end;
	EndUpdate();
end
593
Is it possible to have a different alignment for parts of the cell's caption

with Tree1 do
begin
	BeginUpdate();
	TreeColumnIndex := -1;
	DrawGridLines := EXTREELib_TLB.exRowLines;
	with (IUnknown(Columns.Add('Default')) as EXTREELib_TLB.Column) do
	begin
		Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
	end;
	with Items do
	begin
		CellHAlignment[OleVariant(AddItem('all-left')),OleVariant(0)] := EXTREELib_TLB.LeftAlignment;
		CellHAlignment[OleVariant(AddItem('all-center')),OleVariant(0)] := EXTREELib_TLB.CenterAlignment;
		CellHAlignment[OleVariant(AddItem('all-right')),OleVariant(0)] := EXTREELib_TLB.RightAlignment;
		h := AddItem('left<c>center<r>right');
		CellCaptionFormat[OleVariant(h),OleVariant(0)] := EXTREELib_TLB.exHTML;
	end;
	EndUpdate();
end
592
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
with Tree1 do
begin
	BeginUpdate();
	with Columns do
	begin
		with (IUnknown(Add('MultipleLine')) as EXTREELib_TLB.Column) do
		begin
			Width := 32;
			Def[EXTREELib_TLB.exCellSingleLine] := OleVariant(False);
			Def[EXTREELib_TLB.exColumnResizeContiguously] := OleVariant(True);
		end;
		with (IUnknown(Add('SingleLine')) as EXTREELib_TLB.Column) do
		begin
			Def[EXTREELib_TLB.exCellSingleLine] := OleVariant(False);
		end;
	end;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('This is a bit of long text that should break the line')),OleVariant(1)] := 'This is a bit of long text that should break the line';
	end;
	EndUpdate();
end
591
How do I sort the index column as numeric

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Tree1AddItem(ASender: TObject; Item : HITEM);
begin
	with Tree1 do
	begin
		with Items do
		begin
			CellData[OleVariant(Item),OleVariant(1)] := OleVariant(ItemToIndex[Item]);
		end;
	end
end;

with Tree1 do
begin
	BeginUpdate();
	DrawGridLines := EXTREELib_TLB.exAllLines;
	ColumnAutoResize := True;
	ShowFocusRect := False;
	with (IUnknown(Columns.Add('Next')) as EXTREELib_TLB.Column) do
	begin
		Def[EXTREELib_TLB.exCellPaddingLeft] := OleVariant(4);
		Def[EXTREELib_TLB.exHeaderPaddingLeft] := OleVariant(4);
	end;
	with (IUnknown(Columns.Add('Index')) as EXTREELib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)';
		Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
		SortType := EXTREELib_TLB.SortUserData;
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 4');
		AddItem('Item 5');
		AddItem('Item 6');
		AddItem('Item 7');
		AddItem('Item 8');
		AddItem('Item 9');
		AddItem('Item 10');
	end;
	EndUpdate();
end
590
How can I put icons/images into buttons

with Tree1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	with (IUnknown(Columns.Add('C+B')) as EXTREELib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `';
		Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
		Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
		Def[EXTREELib_TLB.exCellHasButton] := OleVariant(True);
		Def[EXTREELib_TLB.exCellButtonAutoWidth] := OleVariant(True);
	end;
	Columns.Add('');
	DrawGridLines := EXTREELib_TLB.exVLines;
	DefaultItemHeight := 20;
	with Items do
	begin
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
	end;
	EndUpdate();
end
589
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

// CellButtonClick event - Fired after the user clicks on the cell of button type. 
procedure TForm1.Tree1CellButtonClick(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with Tree1 do
	begin
			OutputDebugString( 'CellButtonClick' );
		OutputDebugString( Item );
	end
end;

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.Tree1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with Tree1 do
	begin
			OutputDebugString( 'CellStateChanged' );
		OutputDebugString( Item );
	end
end;

with Tree1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	with (IUnknown(Columns.Add('')) as EXTREELib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 32;
		FormatColumn := '1 index ``';
	end;
	with (IUnknown(Columns.Add('Def')) as EXTREELib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '`     `';
		Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
		Def[EXTREELib_TLB.exCellHasButton] := OleVariant(True);
		Def[EXTREELib_TLB.exCellButtonAutoWidth] := OleVariant(True);
	end;
	Columns.Add('');
	with Items do
	begin
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
		AddItem('');
	end;
	EndUpdate();
end
588
Does filtering work with umlauts / accents characters
with Tree1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Names')) as EXTREELib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXTREELib_TLB.exPattern;
	end;
	with Items do
	begin
		AddItem('Mantel');
		AddItem('Mechanik');
		AddItem('Motor');
		AddItem('Murks');
		AddItem('Märchen');
		AddItem('Möhren');
		AddItem('Mühle');
		AddItem('Sérigraphie');
	end;
	Columns.Item[OleVariant(0)].Filter := '*ä*';
	ApplyFilter();
	EndUpdate();
end
587
The Items.FirstVisibleItem property is read-only. How can I change the first visible item

with Tree1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	with (IUnknown(Columns.Add('Pos')) as EXTREELib_TLB.Column) do
	begin
		Position := 0;
		FormatColumn := '0 index ``';
		Width := 32;
		Def[EXTREELib_TLB.exCellBackColor] := OleVariant(15790320);
	end;
	ScrollPos[True] := 13;
	EndUpdate();
end
586
How FullPath method works

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		h := AddItem('Root');
		CellCaption[OleVariant(h),OleVariant(1)] := 'A';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 1')),OleVariant(1)] := 'B';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 2')),OleVariant(1)] := 'C';
		ExpandItem[h] := True;
	end;
	SearchColumnIndex := 1;
	OutputDebugString( SearchColumnIndex );
	OutputDebugString( Items.FullPath[.ItemByIndex[2]] );
	SearchColumnIndex := 0;
	OutputDebugString( SearchColumnIndex );
	OutputDebugString( Items.FullPath[.ItemByIndex[2]] );
	EndUpdate();
end
585
How can I filter for multiple captions on a single column, using OR clause

with Tree1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := True;
	SearchColumnIndex := 1;
	FilterBarPromptVisible := True;
	with Columns do
	begin
		(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
		with (IUnknown(Add('Title')) as EXTREELib_TLB.Column) do
		begin
			Width := 96;
		end;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Andrew Fuller');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
		SelectItem[h0] := True;
		h0 := AddItem('Janet Leverling');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
		h0 := AddItem('Margaret Peacock');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
		h0 := AddItem('Steven Buchanan');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Michael Suyama');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Robert King');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Laura Callahan');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Anne Dodsworth');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
	end;
	FilterBarPromptColumns := '1';
	FilterBarPromptPattern := 'Vice Inside';
	FilterBarPromptType := EXTREELib_TLB.exFilterPromptContainsAny;
	EndUpdate();
end
584
How can I filter for multiple captions on a single column, using AND clause

with Tree1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := True;
	SearchColumnIndex := 1;
	FilterBarPromptVisible := True;
	with Columns do
	begin
		(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
		with (IUnknown(Add('Title')) as EXTREELib_TLB.Column) do
		begin
			Width := 96;
		end;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Andrew Fuller');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
		SelectItem[h0] := True;
		h0 := AddItem('Janet Leverling');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
		h0 := AddItem('Margaret Peacock');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
		h0 := AddItem('Steven Buchanan');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Michael Suyama');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Robert King');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Laura Callahan');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Anne Dodsworth');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
	end;
	FilterBarPromptColumns := '1';
	FilterBarPromptPattern := 'Vice Sales';
	FilterBarPromptType := EXTREELib_TLB.exFilterPromptContainsAll;
	EndUpdate();
end
583
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
with Tree1 do
begin
	BeginUpdate();
	ColumnAutoResize := True;
	ContinueColumnScroll := False;
	MarkSearchColumn := False;
	SearchColumnIndex := 1;
	FilterBarHeight := 0;
	FilterBarPromptVisible := True;
	with Columns do
	begin
		(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
		(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
		Add('City');
	end;
	with Items do
	begin
		h0 := AddItem('Nancy Davolio');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Andrew Fuller');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
		SelectItem[h0] := True;
		h0 := AddItem('Janet Leverling');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
		h0 := AddItem('Margaret Peacock');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
		h0 := AddItem('Steven Buchanan');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Michael Suyama');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Robert King');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
		h0 := AddItem('Laura Callahan');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
		h0 := AddItem('Anne Dodsworth');
		CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
		CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
	end;
	FilterBarPromptPattern := 'London';
	EndUpdate();
end
582
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Tree1AddItem(ASender: TObject; Item : HITEM);
begin
	with Tree1 do
	begin
		with Items do
		begin
			SetParent(Item,FindItem[CellCaption[OleVariant(Item),'ReportsTo'],'EmployeeID',Null]);
		end;
	end
end;

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('SELECT * FROM Employees ORDER BY ReportsTo','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Items.ExpandItem[0] := True;
	EndUpdate();
end
581
Is there any option to control where I can drop the items when using the AutoDrag property
// AllowAutoDrag event - Occurs when the user drags the item between InsertA and InsertB as child of NewParent.
procedure TForm1.Tree1AllowAutoDrag(ASender: TObject; Item : HITEM;NewParent : HITEM;InsertA : HITEM;InsertB : HITEM;var Cancel : WordBool);
begin
	with Tree1 do
	begin
		with Items do
		begin
			OutputDebugString( 'NewParent' );
			OutputDebugString( CellCaption[OleVariant(NewParent),OleVariant(0)] );
			OutputDebugString( 'After' );
			OutputDebugString( CellCaption[OleVariant(InsertA),OleVariant(0)] );
			OutputDebugString( 'Before' );
			OutputDebugString( CellCaption[OleVariant(InsertB),OleVariant(0)] );
		end;
		Cancel := True;
	end
end;

with Tree1 do
begin
	BeginUpdate();
	AutoDrag := EXTREELib_TLB.exAutoDragPositionAny;
	LinesAtRoot := EXTREELib_TLB.exNoLinesAtRoot;
	HasLines := EXTREELib_TLB.exThinLine;
	ShowFocusRect := False;
	Columns.Add('Task');
	with Items do
	begin
		h := AddItem('Group 1');
		ItemDivider[h] := 0;
		ItemBold[h] := True;
		h1 := InsertItem(h,Null,'Task 1');
		h2 := InsertItem(h,Null,'Task 2');
		h3 := InsertItem(h,Null,'Task 3');
		ExpandItem[h] := True;
		h := AddItem('Group 2');
		ItemBold[h] := True;
		ItemDivider[h] := 0;
	end;
	EndUpdate();
end
580
The FindPath is not case sensitive. How can I make it work case sensitive

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	Columns.Add('Default');
	ASCIIUpper := '';
	with Items do
	begin
		h := AddItem('L:');
		InsertItem(h,Null,'test');
		InsertItem(h,Null,'Test');
		InsertItem(h,Null,'TEST');
		ExpandItem[h] := True;
		ItemBold[FindPath['L:\TEST']] := True;
	end;
	EndUpdate();
end
579
How do I enable / display a tooltip while user selects new items from the drop down filter panel

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Items')) as EXTREELib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXTREELib_TLB.exShowExclude) Or Integer(EXTREELib_TLB.exEnableToolTip) Or Integer(EXTREELib_TLB.exShowFocusItem) Or Integer(EXTREELib_TLB.exShowCheckBox);
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 4');
	end;
	with Columns.Item[OleVariant(0)] do
	begin
		FilterType := Integer(EXTREELib_TLB.exFilterExclude) Or Integer(EXTREELib_TLB.exFilter);
		Filter := 'Item 1|Item 4';
	end;
	ApplyFilter();
	EndUpdate();
end
578
How can I align captions of items with checkbox, with items with no checkbox

with Tree1 do
begin
	BeginUpdate();
	Columns.Add('Default');
	with Items do
	begin
		CellImages[OleVariant(AddItem(OleVariant(0))),OleVariant(0)] := '1';
		CellHasCheckBox[OleVariant(AddItem(OleVariant(1))),OleVariant(0)] := True;
		CellImages[OleVariant(AddItem(OleVariant(2))),OleVariant(0)] := '1';
	end;
	EndUpdate();
end
577
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// MouseDown event - Occurs when the user presses a mouse button.
procedure TForm1.Tree1MouseDown(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
	// Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))
end;

with Tree1 do
begin
	BeginUpdate();
	TreeColumnIndex := -1;
	SelForeColor := ForeColor;
	with (IUnknown(Columns.Add('Buttons')) as EXTREELib_TLB.Column) do
	begin
		Alignment := EXTREELib_TLB.CenterAlignment;
		Def[EXTREELib_TLB.exCellHasButton] := OleVariant(True);
	end;
	with Items do
	begin
		AddItem('Button A');
		AddItem('Button B');
		AddItem('Button C');
	end;
	EndUpdate();
end
576
Does the title of the cell's tooltip supports HTML format

with Tree1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('')) as EXTREELib_TLB.Column) do
	begin
		Caption := '';
		HTMLCaption := 'Column';
	end;
	with Items do
	begin
		CellToolTip[OleVariant(AddItem('tooltip w/h different title')),OleVariant(0)] := '<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that''s shown when the user hovers the cell. This shows the titl' + 
	'e centered with a different color.';
	end;
	EndUpdate();
end
575
How do I specify a different title for the cell's tooltip

with Tree1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('')) as EXTREELib_TLB.Column) do
	begin
		Caption := 'This is the title';
		HTMLCaption := 'Column';
	end;
	with Items do
	begin
		CellToolTip[OleVariant(AddItem('tooltip w/h different title')),OleVariant(0)] := 'This is bit of text that''s shown when the user hovers the cell.';
	end;
	EndUpdate();
end
574
The cell's tooltip displays the column's caption in its title. How can I get ride of that

with Tree1 do
begin
	BeginUpdate();
	with Columns do
	begin
		Add('C1');
		Add('C2');
	end;
	with Items do
	begin
		h := AddItem('tooltip w/h caption');
		CellToolTip[OleVariant(h),OleVariant(0)] := 'This is bit of text that''s shown when the user hovers the cell. This shows the column''s caption in the title.';
		CellCaption[OleVariant(h),OleVariant(1)] := 'tooltip no caption';
		CellToolTip[OleVariant(h),OleVariant(1)] := 'This is bit of text that''s shown when the user hovers the cell. This shows no column''s caption in the title.';
	end;
	with Columns.Item['C2'] do
	begin
		HTMLCaption := Caption;
		Caption := '';
	end;
	EndUpdate();
end
573
How can I programmatically show the column's filter

// RClick event - Fired when right mouse button is clicked
procedure TForm1.Tree1RClick(ASender: TObject; );
begin
	with Tree1 do
	begin
		i := ItemFromPoint[-1,-1,c,hit];
		Columns.Item[OleVariant(c)].ShowFilter('-1,-1,128,128');
	end
end;

with Tree1 do
begin
	BeginUpdate();
	ShowFocusRect := False;
	with (IUnknown(Columns.Add('Items ')) as EXTREELib_TLB.Column) do
	begin
		DisplayFilterPattern := False;
		FilterList := Integer(EXTREELib_TLB.exShowExclude) Or Integer(EXTREELib_TLB.exShowFocusItem) Or Integer(EXTREELib_TLB.exShowCheckBox);
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	EndUpdate();
end
572
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

// ColumnClick event - Fired after the user clicks on column's header.
procedure TForm1.Tree1ColumnClick(ASender: TObject; Column : IColumn);
begin
	// Column.SortOrder = 1
	with Tree1 do
	begin
		SortOnClick := EXTREELib_TLB.exDefaultSort;
		Columns.Item['Sort'].SortOrder := EXTREELib_TLB.SortAscending;
		SortOnClick := EXTREELib_TLB.exUserSort;
	end
end;

with Tree1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	SortOnClick := EXTREELib_TLB.exUserSort;
	Columns.Add('Items');
	(IUnknown(Columns.Add('Sort')) as EXTREELib_TLB.Column).Visible := False;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('Item 1 (3)')),OleVariant(1)] := OleVariant(3);
		CellCaption[OleVariant(AddItem('Item 2 (1)')),OleVariant(1)] := OleVariant(1);
		CellCaption[OleVariant(AddItem('Item 3 (2)')),OleVariant(1)] := OleVariant(2);
	end;
	EndUpdate();
end
571
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

// ColumnClick event - Fired after the user clicks on column's header.
procedure TForm1.Tree1ColumnClick(ASender: TObject; Column : IColumn);
begin
	// Column.SortOrder = 1
	with Tree1 do
	begin
		Items.SortChildren(0,'Sort',True);
	end
end;

with Tree1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	SortOnClick := EXTREELib_TLB.exUserSort;
	Columns.Add('Items');
	(IUnknown(Columns.Add('Sort')) as EXTREELib_TLB.Column).Visible := False;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('Item 1 (3)')),OleVariant(1)] := OleVariant(3);
		CellCaption[OleVariant(AddItem('Item 2 (1)')),OleVariant(1)] := OleVariant(1);
		CellCaption[OleVariant(AddItem('Item 3 (2)')),OleVariant(1)] := OleVariant(2);
	end;
	EndUpdate();
end
570
I have a 3 level hierarchy in the treeview, and I want to create a filter that only shows the items in the 2nd level of the hierarchy, is this possible

with Tree1 do
begin
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	MarkSearchColumn := False;
	Columns.Add('Items');
	(IUnknown(Columns.Add('Level')) as EXTREELib_TLB.Column).Visible := False;
	with Items do
	begin
		h := AddItem('Parent');
		CellCaption[OleVariant(h),OleVariant(1)] := OleVariant(0);
		hChild := InsertItem(h,Null,'Child 1.1');
		CellCaption[OleVariant(hChild),OleVariant(1)] := OleVariant(1);
		hSubChild := InsertItem(hChild,Null,'SubChild A');
		CellCaption[OleVariant(hSubChild),OleVariant(1)] := OleVariant(2);
		hChild := InsertItem(h,Null,'Child 1.2');
		CellCaption[OleVariant(hChild),OleVariant(1)] := OleVariant(1);
		hSubChild := InsertItem(hChild,Null,'SubChild B');
		CellCaption[OleVariant(hSubChild),OleVariant(1)] := OleVariant(2);
		ExpandItem[h] := True;
	end;
	FilterInclude := EXTREELib_TLB.exMatchingItemsOnly;
	with Columns.Item['Level'] do
	begin
		FilterType := EXTREELib_TLB.exFilter;
		Filter := 2;
	end;
	ApplyFilter();
end
569
How can I sort by two-columns, one by date and one by time

with Tree1 do
begin
	BeginUpdate();
	SingleSort := False;
	with Columns do
	begin
		(IUnknown(Add('Index')) as EXTREELib_TLB.Column).FormatColumn := '1 index ``';
		(IUnknown(Add('Date')) as EXTREELib_TLB.Column).SortType := EXTREELib_TLB.SortDate;
		with (IUnknown(Add('Time')) as EXTREELib_TLB.Column) do
		begin
			SortType := EXTREELib_TLB.SortTime;
			FormatColumn := 'time(value)';
		end;
	end;
	with Items do
	begin
		h := AddItem(OleVariant(0));
		CellCaption[OleVariant(h),OleVariant(1)] := '1/1/2001';
		CellCaption[OleVariant(h),OleVariant(2)] := '1/1/2001 10:00:00 AM';
		h := AddItem(OleVariant(0));
		CellCaption[OleVariant(h),OleVariant(1)] := '12/31/2000';
		CellCaption[OleVariant(h),OleVariant(2)] := '1/1/2001 10:00:00 AM';
		h := AddItem(OleVariant(0));
		CellCaption[OleVariant(h),OleVariant(1)] := '1/1/2001';
		CellCaption[OleVariant(h),OleVariant(2)] := '1/1/2001 6:00:00 AM';
		h := AddItem(OleVariant(0));
		CellCaption[OleVariant(h),OleVariant(1)] := '12/31/2000';
		CellCaption[OleVariant(h),OleVariant(2)] := '1/1/2001 8:00:00 AM';
		h := AddItem(OleVariant(0));
		CellCaption[OleVariant(h),OleVariant(1)] := '1/1/2001';
		CellCaption[OleVariant(h),OleVariant(2)] := '1/1/2001 8:00:00 AM';
		h := AddItem(OleVariant(0));
		CellCaption[OleVariant(h),OleVariant(1)] := '12/31/2000';
		CellCaption[OleVariant(h),OleVariant(2)] := '1/1/2001 6:00:00 AM';
	end;
	Layout := 'multiplesort="C1:1 C2:1"';
	EndUpdate();
end
568
We are using custom buttons for the +/- on the treeview control, is there a way to control the size of the image

with Tree1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(3,'gBFLBCJwBAEHhEJAAChABDEMACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSKUOQTDKMIziaQIRg8JYlDTJcIjKKEVQHFiXIrAKKwEgmEQMQiCcbzXI' + 
	'UBxAAqVZZFUaKAi+Qg4TLBAzUSAAYhtHqeJBjID4JA6UJXRpIAIQSSBUjGOg6TiMUYZAguAxCEzZUT0fAYUQSCC3ZzDCKoRpiCT7Xg8V5OVbjUz9P7AMBwLA7erxap6P' + 
	'JeD54QymGp/R5eMhyLI8UxXFqRY6veKtJhGDIrT5CEIQVA9EyXJqnahqOiaCguPorQy/dYYdg2BYBPS6MAvG4bVrOd59XrgN42fY2ByzAqlMQwS7rOqiY6YWTnehWToH' + 
	'E+JZUmoLB5CufQuAkBYkGO+ZrDWAo7keZZyHmH5+i8X4bluaJyHgGB9mQHx3JjBpViqJRHmueZ7H8Xo3i2fYAl+d5tncMRfDcdZeDMDIjCCJwokoEoQiEJ4KCIfIdgUS' + 
	'ZIAWaoGCEUh2BIJ4gnKBgMDICAnHoCggg0Aw4k0KAJkIagaguYwIj4LAmiKEw2CUIIiHMUJSDQSYyGCFYMGQCJCD0JRjiMRg3gmTYjGSVgmgkchSD4JJklIRIXCSSQYj' + 
	'4U4UgkQhGE+EwJEkJJWhGpgGGIOBNmMdhPg8SRiHCGAlibNhohqJpJi4T4ZA2WYIgEYInGOGJlDkCQyECDoTEkKQ+E+C5oCIVhQCUCQpnSDoeg4SZZH8YdhjibQ7AiUg' + 
	'kgcJFyiyEYmGmOhqhyJ5pmILoYCKaRSB6Eg7CcZgZggaRqHqNoTiuDpKkKMormsQ4xiUYgYiKEo6CCWgWiqPovloZoGjoKQYiQBCAg==');
		Add(4,'gBFLBCJwBAEHhEJAAChABDcMACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSKUOQTDKMIziaQIRg8JYlDTJcIjKKEVQHFiXIrAKKwEgmEQMQiCcbzXI' + 
	'UBxAAqVZZFUaKAi+Qg4TLBAzUSAAYhtHqeJBjID4JA6UJXRpIAIQSSBUjGOg6TiMUYZAguAxCEzZUT0fAYUQSCC3ZzDCKoRpiCT7Xg8V5OVbjUz9P7AMBwLA7erxap6P' + 
	'JeD54QymGp/R5eMhyLI8UxXFqRY6veKtJhGDIrT5CEIQVA9EyXJqnahqOiaCguPorQy/dYYdg2BYBPS6MAvG4bVrOd59XrgN42fY2ByzAqlMQwS7rOqiY6YWTnehWToH' + 
	'E+JZUmoLB5CufQuAkBYkGO+ZrDWAo7keZZyHmPQ+g8X4fluYBhneEB9l0Iwpg6RRWiqFQfg+V5nnefh/GAB5yAIfRMFeRZdHeDJDCiSApkoMoEiQKBJmKCIfCcYQiHIF' + 
	'YFkmeBaBOA5JmgMIhgITICAmXoBkgIxAk4MxKAIcIaD+YpIjYLoLmMCI2CkJoiGMNgiCCIhDFCUg0EmMhghWDBkAkBg9CUY4jEYN4JA2IxklYJoJHIUg+CSZJSESFwkm' + 
	'UKRSFOFRlCIUIRhOZJCFISQ1iQdgEgGGJOBMeJdhOY5SFiHAmAkaYmG6GwmhmLhthsJJ5hSXYYkgFgKHgOYOFOEITCQCJpDSEoTmgQhUhOIRoHoGoCh+SJpnCZIeBedg' + 
	'aHgO4OlOMINCISByECDQikkGhuh2JwpmqBogCKaYiC6FwhmkQ4yHgYYYgaFopiuaRakCbIsisSpGjYOwaFYIYKCkK5CA2IRqiwCwFiYaBrkKEYKEAQCAgA==');
		Add(1,'CP:3 -4 -4 4 4');
		Add(2,'CP:4 -4 -4 4 4');
	end;
	DefaultItemHeight := 22;
	LinesAtRoot := EXTREELib_TLB.exGroupLinesAtRoot;
	HasButtons := EXTREELib_TLB.exCustom;
	HasButtonsCustom[False] := 16777216;
	HasButtonsCustom[True] := 33554432;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Null,'Child');
	end;
	EndUpdate();
end
567
How can I connect to a DBF file
with Tree1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	MarkSearchColumn := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Select * From foxcode.DBF','Provider=vfpoledb;Data Source=C:\Program Files\Microsoft Visual FoxPro 9\',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	EndUpdate();
end
566
Do you have any Fit-To-Page options when printing the control

with Tree1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	EndUpdate();
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print'))) as EXPRINTLib_TLB.Print) do
	begin
		Options := 'FitToPage = On';
		PrintExt := (IUnknown(Tree1.DefaultInterface) as EXTREELib_TLB.Tree);
		Preview();
	end;
end
565
Does your control supports scrolling by touching the screen

with Tree1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	AutoDrag := Integer(EXTREELib_TLB.exAutoDragScrollOnShortTouch) Or Integer(EXTREELib_TLB.exAutoDragScroll);
	ScrollBySingleLine := True;
	ContinueColumnScroll := True;
	EndUpdate();
end
564
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control

with Tree1 do
begin
	BackColorAlternate := $7ff0f0f0;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 4');
		AddItem('Item 5');
	end;
end
563
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.Tree1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
	with Tree1 do
	begin
		with Items do
		begin
			CellCaption[OleVariant(Item),OleVariant(2)] := OleVariant(CellState[OleVariant(Item),OleVariant(0)]);
		end;
	end
end;

with Tree1 do
begin
	BeginUpdate();
	ShowFocusRect := False;
	MarkSearchColumn := False;
	SelBackMode := EXTREELib_TLB.exTransparent;
	var_ConditionalFormat := ConditionalFormats.Add('%2 != 0',Null);
	with var_ConditionalFormat do
	begin
		Bold := True;
		ForeColor := $ff;
		ApplyTo := EXTREELib_TLB.exFormatToItems;
	end;
	with (IUnknown(Columns.Add('')) as EXTREELib_TLB.Column) do
	begin
		Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
		Width := 16;
		AllowSizing := False;
	end;
	Columns.Add('Information');
	(IUnknown(Columns.Add('Hidden')) as EXTREELib_TLB.Column).Visible := False;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('')),OleVariant(1)] := 'This is a bit of text associated';
		h := AddItem('');
		CellCaption[OleVariant(h),OleVariant(1)] := 'This is a bit of text associated';
		CellState[OleVariant(h),OleVariant(0)] := 1;
		CellCaption[OleVariant(AddItem('')),OleVariant(1)] := 'This is a bit of text associated';
	end;
	EndUpdate();
end
562
How can I start editing the cell as soon as the user clicks a cell

// AfterCellEdit event - Occurs after data in the current cell is edited.
procedure TForm1.Tree1AfterCellEdit(ASender: TObject; Item : HITEM;ColIndex : Integer;NewCaption : WideString);
begin
	with Tree1 do
	begin
		Items.CellCaption[OleVariant(Item),OleVariant(ColIndex)] := OleVariant(NewCaption);
	end
end;

// CancelCellEdit event - Occurs if the edit operation is canceled.
procedure TForm1.Tree1CancelCellEdit(ASender: TObject; Item : HITEM;ColIndex : Integer;Reserved : OleVariant);
begin
	with Tree1 do
	begin
		Items.CellCaption[OleVariant(Item),OleVariant(ColIndex)] := OleVariant(Reserved);
	end
end;

// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
procedure TForm1.Tree1Click(ASender: TObject; );
begin
	with Tree1 do
	begin
		with Items do
		begin
			Edit(OleVariant(FocusItem),OleVariant(0));
		end;
	end
end;

with Tree1 do
begin
	AllowEdit := True;
	Columns.Add('Column');
	Items.AddItem('Item 1');
	Items.AddItem('Item 2');
	Items.AddItem('');
end
561
How do I programmatically exclude items from the filter

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Items')) as EXTREELib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXTREELib_TLB.exShowExclude) Or Integer(EXTREELib_TLB.exShowFocusItem) Or Integer(EXTREELib_TLB.exShowCheckBox);
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 4');
	end;
	with Columns.Item[OleVariant(0)] do
	begin
		FilterType := Integer(EXTREELib_TLB.exFilterExclude) Or Integer(EXTREELib_TLB.exFilter);
		Filter := 'Item 1|Item 4';
	end;
	ApplyFilter();
	EndUpdate();
end
560
How can I sort the columns to be displayed on the columns floating bar

with Tree1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		(IUnknown(Add('City')) as EXTREELib_TLB.Column).Visible := False;
		(IUnknown(Add('Start')) as EXTREELib_TLB.Column).Visible := False;
		(IUnknown(Add('End')) as EXTREELib_TLB.Column).Visible := False;
	end;
	ColumnsFloatBarVisible := EXTREELib_TLB.exColumnsFloatBarVisibleIncludeHiddenColumns;
	ColumnsFloatBarSortOrder := EXTREELib_TLB.SortAscending;
end
559
How can I add a vertical padding

with Tree1 do
begin
	BeginUpdate();
	DrawGridLines := EXTREELib_TLB.exAllLines;
	with (IUnknown(Columns.Add('Padding')) as EXTREELib_TLB.Column) do
	begin
		Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
		Def[EXTREELib_TLB.exCellSingleLine] := OleVariant(False);
		Def[EXTREELib_TLB.exCellPaddingLeft] := OleVariant(6);
		Def[EXTREELib_TLB.exCellPaddingRight] := OleVariant(6);
		Def[EXTREELib_TLB.exCellPaddingTop] := OleVariant(6);
		Def[EXTREELib_TLB.exCellPaddingBottom] := OleVariant(6);
	end;
	with Items do
	begin
		AddItem('padding');
		AddItem('padding');
	end;
	EndUpdate();
end
558
Is the PutItems method running .AddItem event

// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Tree1AddItem(ASender: TObject; Item : HITEM);
begin
	with Tree1 do
	begin
		OutputDebugString( 'Adding ...' );
		OutputDebugString( Items.CellCaption[OleVariant(Item),OleVariant(0)] );
	end
end;

with Tree1 do
begin
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	Columns.Add('Def');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
	end;
	OutputDebugString( 'Call PutItems' );
	PutItems(GetItems(OleVariant(-1)),Null);
end
557
How do you embed HTML options into the anchor click string

// AnchorClick event - Occurs when an anchor element is clicked.
procedure TForm1.Tree1AnchorClick(ASender: TObject; AnchorID : WideString;Options : WideString);
begin
	with Tree1 do
	begin
		OutputDebugString( AnchorID );
		OutputDebugString( Options );
	end
end;

with Tree1 do
begin
	BeginUpdate();
	with Columns do
	begin
		(IUnknown(Add('Car')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
	end;
	with Items do
	begin
		AddItem('<a mazda_1;options for 1>Mazda <b>1</b></a>');
		AddItem('<a mazda_2;options for 2>Mazda <b>2</b></a>');
		AddItem('<a mazda_3;options for 3a>Mazda <b>3.a</b></a>');
		AddItem('<a mazda_3;options for 3b>Mazda <b>3.b</b></a>');
	end;
	EndUpdate();
end
556
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)

with Tree1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78eg' + 
	'BHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRxL' + 
	'C8Mw3BDvYDkOAABAIgI=');
	SelBackColor := $1fffffe;
	ShowFocusRect := False;
	Columns.Add('Items');
	with Items do
	begin
		ItemBackColor[AddItem('red')] := $ff;
		ItemBackColor[AddItem('blue')] := $ff0000;
		ItemBackColor[AddItem('green')] := $ff00;
	end;
	EndUpdate();
end
555
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)

with Tree1 do
begin
	BeginUpdate();
	SelBackMode := EXTREELib_TLB.exTransparent;
	ShowFocusRect := False;
	Columns.Add('Items');
	with Items do
	begin
		ItemBackColor[AddItem('red')] := $ff;
		ItemBackColor[AddItem('blue')] := $ff0000;
		ItemBackColor[AddItem('green')] := $ff00;
	end;
	EndUpdate();
end
554
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)

with Tree1 do
begin
	BeginUpdate();
	SelBackColor := BackColor;
	SelForeColor := ForeColor;
	ShowFocusRect := True;
	Columns.Add('Items');
	with Items do
	begin
		ItemBackColor[AddItem('red')] := $ff;
		ItemBackColor[AddItem('blue')] := $ff0000;
		ItemBackColor[AddItem('green')] := $ff00;
	end;
	EndUpdate();
end
553
How do I arrange my columns on multiple levels

with Tree1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	DrawGridLines := EXTREELib_TLB.exAllLines;
	with Columns do
	begin
		with (IUnknown(Add('C0')) as EXTREELib_TLB.Column) do
		begin
			ExpandColumns := '1,2';
			DisplayExpandButton := False;
		end;
		Add('C1');
		Add('C2');
		Add('C3');
		with (IUnknown(Add('C4')) as EXTREELib_TLB.Column) do
		begin
			ExpandColumns := '5,6';
			DisplayExpandButton := False;
		end;
		Add('C5');
		with (IUnknown(Add('C6')) as EXTREELib_TLB.Column) do
		begin
			ExpandColumns := '6,7';
			DisplayExpandButton := False;
		end;
		Add('C7');
	end;
	EndUpdate();
end
552
Does your control support expandable header or columns, so I can arrange it on multiple levels

with Tree1 do
begin
	BeginUpdate();
	DrawGridLines := EXTREELib_TLB.exAllLines;
	BackColorLevelHeader := RGB(240,240,240);
	with Columns do
	begin
		with (IUnknown(Add('Photo')) as EXTREELib_TLB.Column) do
		begin
			AllowSizing := False;
			Width := 32;
		end;
		Add('Personal Info');
		Add('Title');
		Add('Name');
		Add('First');
		Add('Last');
		Add('Address');
		Item['Personal Info'].ExpandColumns := '2,3';
		with Item['Name'] do
		begin
			ExpandColumns := '4,5';
			Expanded := False;
		end;
	end;
	EndUpdate();
end
551
Does your control support subscript or superscript, in HTML captions

with Tree1 do
begin
	ColumnAutoResize := False;
	HeaderHeight := 28;
	DefaultItemHeight := 24;
	with Columns do
	begin
		with (IUnknown(Add('Column 1')) as EXTREELib_TLB.Column) do
		begin
			HTMLCaption := 'Column <b><off 2><font ;6>1';
			Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
		end;
		with (IUnknown(Add('Column 2')) as EXTREELib_TLB.Column) do
		begin
			HTMLCaption := 'Column <b><off 2><font ;6>2';
			Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
		end;
		with (IUnknown(Add('Column 3')) as EXTREELib_TLB.Column) do
		begin
			HTMLCaption := 'Column <b><off 2><font ;6>3';
			Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
		end;
	end;
	with Items do
	begin
		h := AddItem('Item <font ;6><off 4>1');
		CellCaption[OleVariant(h),OleVariant(1)] := 'Item <font ;6><off -6>2';
		CellCaption[OleVariant(h),OleVariant(2)] := 'Item <b><font ;6><off -6>2<off 4>3<off 4>1';
	end;
end
550
Is there any property I can save and restore automatically the current setting, column position, size, and so on (2)

with Tree1 do
begin
	BeginUpdate();
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	Layout := 'Select="0";SingleSort="C0:2";Columns=1';
	EndUpdate();
end
549
Is there any property I can save and restore automatically the current setting, column position, size, and so on (1)

with Tree1 do
begin
	BeginUpdate();
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	Layout := 'gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujMbjsfkMFk0YhkQgUOjUEl8gjcGO0ok8KMULjEaGMcj08kQAO8oMkTNEtGwAGQ' + 
	'Aqc7gUlhh1ABtAEsk9GpEfhElgVcsMupNlnlonlaAFcr0shUsp8QPEtnVJqJhmcIhUMh0QiU5sYAqMngUSuEMw07k8Qv0SgVRrNEuVflF2jF5x9JyNEm0TjQijemyE0j' + 
	'E3t+YruauoAu4Az1qj9BzRn0UzksSnAA0xDjY6qnAw8OiUQ0dwzN0zWz2t7j8/xURAGNvWH6k8xlEhklhEI0O/6QAgI=';
	EndUpdate();
end
548
I have noticed that the column's header is changed once the cursor hovers it. Is it possible to change that visual appearance

with Tree1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Columns do
	begin
		Add('Column 1');
		Add('Column 2');
	end;
	BackColorHeader := $1000000;
	Background[EXTREELib_TLB.exCursorHoverColumn] := $12d86ff;
end
547
Is it possible to change the visual appearance of the columns selector/floating bar(3)

with Tree1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXTREELib_TLB.Column).Visible := False;
	end;
	VisualAppearance.Add(2,'c:\exontrol\images\normal.ebn');
	VisualAppearance.Add(3,'c:\exontrol\images\pushed.ebn');
	Background[EXTREELib_TLB.exColumnsFloatAppearance] := $2000000;
	Background[EXTREELib_TLB.exColumnsFloatBackColor] := $3000000;
	Background[EXTREELib_TLB.exColumnsFloatCaptionBackColor] := $f0f5f6;
	ColumnsFloatBarVisible := EXTREELib_TLB.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
546
Is it possible to change the visual appearance of the columns selector/floating bar(2)

with Tree1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXTREELib_TLB.Column).Visible := False;
	end;
	VisualAppearance.Add(3,'c:\exontrol\images\pushed.ebn');
	Background[EXTREELib_TLB.exColumnsFloatBackColor] := $3000000;
	ColumnsFloatBarVisible := EXTREELib_TLB.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
545
Is it possible to change the visual appearance of the columns selector/floating bar(1)

with Tree1 do
begin
	VisualAppearance.Add(2,'c:\exontrol\images\normal.ebn');
	Background[EXTREELib_TLB.exColumnsFloatAppearance] := $2000000;
	Background[EXTREELib_TLB.exColumnsFloatBackColor] := $f0f5f6;
	Background[EXTREELib_TLB.exColumnsFloatCaptionBackColor] := $f0f5f6;
	ColumnsFloatBarVisible := EXTREELib_TLB.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
544
I am using the ColumnsFloatBarVisible property on True, but still not able to add any column on that list

with Tree1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXTREELib_TLB.Column).Visible := False;
	end;
	ColumnsFloatBarVisible := EXTREELib_TLB.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
543
Is it possible to list a column to columns selector/floating bar, but still user can use it

with Tree1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXTREELib_TLB.Column).Visible := False;
		with (IUnknown(Add('Column 3')) as EXTREELib_TLB.Column) do
		begin
			Visible := False;
			Enabled := False;
		end;
	end;
	ColumnsFloatBarVisible := EXTREELib_TLB.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
542
How can I prevent a specific column not to be listed in the columns selector/floating bar

with Tree1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXTREELib_TLB.Column).Visible := False;
		with (IUnknown(Add('Column 3')) as EXTREELib_TLB.Column) do
		begin
			Visible := False;
			AllowDragging := False;
		end;
	end;
	ColumnsFloatBarVisible := EXTREELib_TLB.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
541
Is it possible to change the "Columns" caption being shown in the columns selector/floating bar

with Tree1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXTREELib_TLB.Column).Visible := False;
	end;
	Description[EXTREELib_TLB.exColumnsFloatBar] := 'Hidden Columns';
	ColumnsFloatBarVisible := EXTREELib_TLB.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
540
How can I show the columns selector, so the user can drag and drop columns to the view

with Tree1 do
begin
	ColumnAutoResize := False;
	with Columns do
	begin
		Add('Column 1');
		(IUnknown(Add('Column 2')) as EXTREELib_TLB.Column).Visible := False;
	end;
	ColumnsFloatBarVisible := EXTREELib_TLB.exColumnsFloatBarVisibleIncludeHiddenColumns;
end
539
The column's header is changed while the cursor hovers it. Is it possible to prevent that

with Tree1 do
begin
	with Columns do
	begin
		Add('Column 1');
		Add('Column 2');
	end;
	Background[EXTREELib_TLB.exCursorHoverColumn] := $ffffffff;
end
538
Is there any public method to export the selected data

with Tree1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	with Columns do
	begin
		Add('C1');
		(IUnknown(Add('C2')) as EXTREELib_TLB.Column).FormatColumn := '1 index `A-Z`';
		(IUnknown(Add('C3')) as EXTREELib_TLB.Column).FormatColumn := '100 index ``';
	end;
	with Items do
	begin
		AddItem('Item 1');
		SelectItem[AddItem('Item 2')] := True;
		AddItem('Item 3');
	end;
	EndUpdate();
	OutputDebugString( 'Export CSV Selected Items Only:' );
	OutputDebugString( Export('','sel') );
end
537
Is it possible to auto-numbering the children items but still keeps the position after filtering

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Items')) as EXTREELib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXTREELib_TLB.exFilter;
		Filter := 'Child 2';
	end;
	with (IUnknown(Columns.Add('Pos.1')) as EXTREELib_TLB.Column) do
	begin
		FormatColumn := '1 ropos ''''';
		Position := 0;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.2')) as EXTREELib_TLB.Column) do
	begin
		FormatColumn := '1 ropos '':''';
		Position := 1;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.3')) as EXTREELib_TLB.Column) do
	begin
		FormatColumn := '1 ropos '':|A-Z''';
		Position := 2;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.4')) as EXTREELib_TLB.Column) do
	begin
		FormatColumn := '1 ropos ''|A-Z|''';
		Position := 3;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.5')) as EXTREELib_TLB.Column) do
	begin
		FormatColumn := '''<font Tahoma;7>'' + 1 ropos ''-<b>||A-Z''';
		Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
		Position := 4;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.6')) as EXTREELib_TLB.Column) do
	begin
		FormatColumn := '''<b>''+ 1 ropos ''</b>:<fgcolor=FF0000>|A-Z|''';
		Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
		Position := 5;
		Width := 48;
		AllowSizing := False;
	end;
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
	end;
	ApplyFilter();
	EndUpdate();
end
536
Is it possible to auto-numbering the children items too

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	Columns.Add('Items');
	with (IUnknown(Columns.Add('Pos.1')) as EXTREELib_TLB.Column) do
	begin
		FormatColumn := '1 rpos ''''';
		Position := 0;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.2')) as EXTREELib_TLB.Column) do
	begin
		FormatColumn := '1 rpos '':''';
		Position := 1;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.3')) as EXTREELib_TLB.Column) do
	begin
		FormatColumn := '1 rpos '':|A-Z''';
		Position := 2;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.4')) as EXTREELib_TLB.Column) do
	begin
		FormatColumn := '1 rpos ''|A-Z|''';
		Position := 3;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.5')) as EXTREELib_TLB.Column) do
	begin
		FormatColumn := '''<font Tahoma;7>'' + 1 rpos ''-<b>||A-Z''';
		Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
		Position := 4;
		Width := 32;
		AllowSizing := False;
	end;
	with (IUnknown(Columns.Add('Pos.6')) as EXTREELib_TLB.Column) do
	begin
		FormatColumn := '''<b>''+ 1 rpos ''</b>:<fgcolor=FF0000>|A-Z|''';
		Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
		Position := 5;
		Width := 48;
		AllowSizing := False;
	end;
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
	end;
	EndUpdate();
end
535
How can I find if there is any filter applied to the control

// FilterChange event - Notifies your application that the filter is changed.
procedure TForm1.Tree1FilterChange(ASender: TObject; );
begin
	with Tree1 do
	begin
		OutputDebugString( 'If negative, the filter is present, else not' );
		OutputDebugString( Items.VisibleItemCount );
	end
end;

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	TreeColumnIndex := -1;
	FilterInclude := EXTREELib_TLB.exMatchingItemsOnly;
	with (IUnknown(Columns.Add('Column')) as EXTREELib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXTREELib_TLB.exFilter;
		Filter := 'C1';
	end;
	with Items do
	begin
		h := AddItem('R1');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
		ExpandItem[h] := True;
		h := AddItem('R2');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
	end;
	ApplyFilter();
	EndUpdate();
end
534
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	TreeColumnIndex := -1;
	FilterInclude := EXTREELib_TLB.exMatchingItemsOnly;
	with (IUnknown(Columns.Add('Column')) as EXTREELib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXTREELib_TLB.exFilter;
		Filter := 'C1|C2';
	end;
	with Items do
	begin
		h := AddItem('R1');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
		ExpandItem[h] := True;
		h := AddItem('R2');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
	end;
	ApplyFilter();
	EndUpdate();
end
533
Is there any method to get only the matched items and not the items with his parent

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	FilterInclude := EXTREELib_TLB.exMatchingItemsOnly;
	with (IUnknown(Columns.Add('Column')) as EXTREELib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXTREELib_TLB.exFilter;
		Filter := 'C1|C2';
	end;
	with Items do
	begin
		h := AddItem('R1');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
		ExpandItem[h] := True;
		h := AddItem('R2');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
	end;
	ApplyFilter();
	EndUpdate();
end
532
How can I add or change the padding (spaces) for captions in the control's header

with Tree1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Padding-Left')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exHeaderPaddingLeft] := OleVariant(18);
	with (IUnknown(Columns.Add('Padding-Right')) as EXTREELib_TLB.Column) do
	begin
		Def[EXTREELib_TLB.exHeaderPaddingRight] := OleVariant(18);
		HeaderAlignment := EXTREELib_TLB.RightAlignment;
	end;
	EndUpdate();
end
531
Do you have any plans to add cell spacing and cell padding to the cells

with Tree1 do
begin
	BeginUpdate();
	DrawGridLines := EXTREELib_TLB.exRowLines;
	with (IUnknown(Columns.Add('Padding-Left')) as EXTREELib_TLB.Column) do
	begin
		Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
		Def[EXTREELib_TLB.exCellPaddingLeft] := OleVariant(18);
	end;
	(IUnknown(Columns.Add('No-Padding')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
	(IUnknown(Columns.Add('Empty')) as EXTREELib_TLB.Column).Position := 0;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('Item A.1')),OleVariant(1)] := 'Item A.2';
		CellCaption[OleVariant(AddItem('Item B.1')),OleVariant(1)] := 'Item B.2';
		CellCaption[OleVariant(AddItem('Item C.1')),OleVariant(1)] := 'Item C.2';
	end;
	EndUpdate();
end
530
Is it possible display numbers in the same format no matter of regional settings in the control panel

with Tree1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Def')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
	with Items do
	begin
		h := AddItem(OleVariant(100000.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') +  '' <fgcolor=808080>(default positive)''';
		h := AddItem(OleVariant(100000.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''2|.|3|,|1|1'')';
		h := AddItem(OleVariant(-100000.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') +  '' <fgcolor=808080>(default negative)''';
		h := AddItem(OleVariant(-100000.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''2|.|3|,|1|1'')';
	end;
	EndUpdate();
end
529
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8

with Tree1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Def')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
	with Items do
	begin
		h := AddItem(OleVariant(0.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') +  '' <fgcolor=808080>(default)''';
		h := AddItem(OleVariant(0.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''|||||0'') +  '' <fgcolor=808080>(Display no leading zeros)''';
	end;
	EndUpdate();
end
528
How can I specify the format for negative numbers

with Tree1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Def')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
	with Items do
	begin
		h := AddItem(OleVariant(-100000.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') +  '' <fgcolor=808080>(default)''';
		h := AddItem(OleVariant(-100000.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''||||1'') +  '' <fgcolor=808080>(Negative sign, number; for example, -1.1)''';
	end;
	EndUpdate();
end
527
Is it possible to change the grouping character when display numbers

with Tree1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Def')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
	with Items do
	begin
		h := AddItem(OleVariant(100000.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') +  '' <fgcolor=808080>(default)''';
		h := AddItem(OleVariant(100000.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''|||-'') +  '' <fgcolor=808080>(grouping character is -)''';
	end;
	EndUpdate();
end
526
How can I display numbers with 2 digits in each group

with Tree1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Def')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
	with Items do
	begin
		h := AddItem(OleVariant(100000.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') +  '' <fgcolor=808080>(default)''';
		h := AddItem(OleVariant(100000.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''||2'') +  '' <fgcolor=808080>(grouping by 2 digits)''';
	end;
	EndUpdate();
end
525
How can I display my numbers using a different decimal separator

with Tree1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Def')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
	with Items do
	begin
		h := AddItem(OleVariant(100.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') +  '' <fgcolor=808080>(default)''';
		h := AddItem(OleVariant(100.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''|;'') +  '' <fgcolor=808080>(decimal separator is <b>;</b>)''';
	end;
	EndUpdate();
end
524
Is it possible to display the numbers using 3 (three) digits

with Tree1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Def')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
	with Items do
	begin
		h := AddItem(OleVariant(100.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') +  '' <fgcolor=808080>(default)''';
		h := AddItem(OleVariant(100.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''3'') +  '' <fgcolor=808080>(3 digits)''';
		h := AddItem(OleVariant(100.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format 2) +  ''  <fgcolor=808080>(2 digits)''';
		h := AddItem(OleVariant(100.27));
		FormatCell[OleVariant(h),OleVariant(0)] := '(value format 1) +  '' <fgcolor=808080>(1 digit)''';
	end;
	EndUpdate();
end
523
Is it possible to format numbers

with Tree1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	with Columns do
	begin
		Add('Name');
		with (IUnknown(Add('A')) as EXTREELib_TLB.Column) do
		begin
			SortType := EXTREELib_TLB.SortNumeric;
			AllowSizing := False;
			Width := 36;
			FormatColumn := 'len(value) ? value + '' +''';
		end;
		with (IUnknown(Add('B')) as EXTREELib_TLB.Column) do
		begin
			SortType := EXTREELib_TLB.SortNumeric;
			AllowSizing := False;
			Width := 36;
			FormatColumn := 'len(value) ? value + '' +''';
		end;
		with (IUnknown(Add('C')) as EXTREELib_TLB.Column) do
		begin
			SortType := EXTREELib_TLB.SortNumeric;
			AllowSizing := False;
			Width := 36;
			FormatColumn := 'len(value) ? value + '' =''';
		end;
		with (IUnknown(Add('A+B+C')) as EXTREELib_TLB.Column) do
		begin
			SortType := EXTREELib_TLB.SortNumeric;
			Width := 64;
			ComputedField := 'dbl(%1)+dbl(%2)+dbl(%3)';
			FormatColumn := 'type(value) in (0,1) ? ''null'' : ( dbl(value)<0 ? ''<fgcolor=FF0000>''+ (value format ''2|.|3|,|1'' ) : (dbl(value)>0 ? ''<fgcolor=000' + 
	'0FF>+''+(value format ''2|.|3|,'' ): ''0.00'') )';
			Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
		end;
	end;
	with Items do
	begin
		h := AddItem('Root');
		CellCaptionFormat[OleVariant(h),OleVariant(4)] := EXTREELib_TLB.exComputedField;
		h1 := InsertItem(h,Null,'Child 1');
		CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(7);
		CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(3);
		CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(1);
		h1 := InsertItem(h,Null,'Child 2');
		CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(-2);
		CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(-2);
		CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(-4);
		h1 := InsertItem(h,Null,'Child 3');
		CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(2);
		CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(2);
		CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(-4);
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
522
I am using the FormatColumn/FormatCell to format my columns. Is it possible to ignore the SelForeColor, so the foreground color for selected items does not override my settings

// SelectionChanged event - Fired after a new item has been selected.
procedure TForm1.Tree1SelectionChanged(ASender: TObject; );
begin
	with Tree1 do
	begin
		with Items do
		begin
			ClearItemBackColor(0);
			ItemBackColor[SelectedItem[0]] := $ffff80;
		end;
	end
end;

with Tree1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	SelForeColor := ForeColor;
	SelBackColor := BackColor;
	ShowFocusRect := False;
	with Columns do
	begin
		with (IUnknown(Add('Format')) as EXTREELib_TLB.Column) do
		begin
			FormatColumn := 'type(value) in (0,1) ? ''null'' : ( dbl(value)<0 ? ''<fgcolor=FF0000>''+ (value format ''2|.|3|,|1'' ) : (dbl(value)>0 ? ''<fgcolor=000' + 
	'0FF>+''+(value format ''2|.|3|,'' ): ''0.00'') )';
			Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
		end;
	end;
	with Items do
	begin
		AddItem(OleVariant(10));
		AddItem(OleVariant(-8));
	end;
	EndUpdate();
end
521
Is it possible to change the height for all items at once

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	Columns.Add('Items');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		h := AddItem('Root 2');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[0] := True;
	end;
	EndUpdate();
	DefaultItemHeight := 12;
	Items.ItemHeight[0] := 12;
end
520
How can I add a footer row

with Tree1 do
begin
	ShowLockedItems := True;
	DrawGridLines := EXTREELib_TLB.exVLines;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		LockedItemCount[EXTREELib_TLB.BottomAlignment] := 1;
		h := LockedItem[EXTREELib_TLB.BottomAlignment,0];
		ItemBackColor[h] := $808080;
		ItemForeColor[h] := $ffffff;
		CellCaption[OleVariant(h),OleVariant(0)] := 'footer c1';
		CellCaption[OleVariant(h),OleVariant(1)] := 'footer c2';
		CellCaption[OleVariant(AddItem('cell')),OleVariant(1)] := 'cell';
	end;
end
519
How can I add a header row

with Tree1 do
begin
	ShowLockedItems := True;
	DrawGridLines := EXTREELib_TLB.exVLines;
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		LockedItemCount[EXTREELib_TLB.TopAlignment] := 1;
		h := LockedItem[EXTREELib_TLB.TopAlignment,0];
		ItemBackColor[h] := $808080;
		ItemForeColor[h] := $ffffff;
		CellCaption[OleVariant(h),OleVariant(0)] := 'footer c1';
		CellCaption[OleVariant(h),OleVariant(1)] := 'footer c2';
		CellCaption[OleVariant(AddItem('cell')),OleVariant(1)] := 'cell';
	end;
end
518
When I'm trying to show string with "line break" character (vbCrLF) in a textbox, it shows 2 squares. Is there any way to hide these squares

with Tree1 do
begin
	with Columns do
	begin
		Add('Value');
		with (IUnknown(Add('CellSingleLine = False')) as EXTREELib_TLB.Column) do
		begin
			ComputedField := '%0';
			Def[EXTREELib_TLB.exCellSingleLine] := OleVariant(False);
		end;
		with (IUnknown(Add('FormatColumn/replace CRLF')) as EXTREELib_TLB.Column) do
		begin
			ComputedField := '%0';
			FormatColumn := 'value replace `\r\n` with ``';
		end;
		with (IUnknown(Add('FormatColumn/replace TAB,CRLF')) as EXTREELib_TLB.Column) do
		begin
			ComputedField := '%0';
			FormatColumn := '(value replace `\t` with ``) replace `\r\n` with ``';
		end;
	end;
	with Items do
	begin
		AddItem('a\ta\r\nb\tb');
	end;
end
517
Is there any way to "unselect" radio group

// DblClick event - Occurs when the user dblclk the left mouse button over an object.
procedure TForm1.Tree1DblClick(ASender: TObject; Shift : Smallint;X : Integer;Y : Integer);
begin
	with Tree1 do
	begin
		with Items do
		begin
			h := CellChecked[1234];
			CellHasCheckBox[OleVariant(0),OleVariant(h)] := True;
			CellState[OleVariant(0),OleVariant(h)] := 0;
			CellHasCheckBox[OleVariant(0),OleVariant(h)] := False;
		end;
	end
end;

// SelectionChanged event - Fired after a new item has been selected.
procedure TForm1.Tree1SelectionChanged(ASender: TObject; );
begin
	with Tree1 do
	begin
		with Items do
		begin
			CellState[OleVariant(FocusItem),OleVariant(0)] := 1;
		end;
	end
end;

with Tree1 do
begin
	MarkSearchColumn := False;
	SelBackColor := RGB(255,255,128);
	SelForeColor := RGB(0,0,0);
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Radio 1');
		CellHasRadioButton[OleVariant(h),OleVariant(0)] := True;
		CellRadioGroup[OleVariant(h),OleVariant(0)] := 1234;
		h := AddItem('Radio 2');
		CellHasRadioButton[OleVariant(h),OleVariant(0)] := True;
		CellRadioGroup[OleVariant(h),OleVariant(0)] := 1234;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		h := AddItem('Radio 3');
		CellHasRadioButton[OleVariant(h),OleVariant(0)] := True;
		CellRadioGroup[OleVariant(h),OleVariant(0)] := 1234;
	end;
end
516
The Column.Alignment property does not seem to work for cells with images in them. What can be done

with Tree1 do
begin
	BeginUpdate();
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	TreeColumnIndex := -1;
	DrawGridLines := EXTREELib_TLB.exAllLines;
	HeaderHeight := 24;
	MarkSearchColumn := False;
	DefaultItemHeight := 24;
	with (IUnknown(Columns.Add('Image')) as EXTREELib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 32;
		HTMLCaption := '<img>1</img>';
		HeaderAlignment := EXTREELib_TLB.CenterAlignment;
		Alignment := EXTREELib_TLB.CenterAlignment;
		Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
	end;
	Columns.Add('Rest');
	with Items do
	begin
		AddItem('<img>1</img>');
		AddItem('<img>2</img>');
		AddItem('<img>3</img>');
	end;
	EndUpdate();
end
515
Can I change the format of date to be shown in the control

with Tree1 do
begin
	with Columns do
	begin
		Add('Default');
		with (IUnknown(Add('Format.1')) as EXTREELib_TLB.Column) do
		begin
			ComputedField := '%0';
			FormatColumn := 'dateF(value) replace `/` with `-`';
		end;
		with (IUnknown(Add('Format.2')) as EXTREELib_TLB.Column) do
		begin
			ComputedField := '%0';
			Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
			FormatColumn := '`<b>`+ shortdate(value) + `</b> ` + timeF(value)';
		end;
		with (IUnknown(Add('Format.3')) as EXTREELib_TLB.Column) do
		begin
			ComputedField := '%0';
			Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
			FormatColumn := '( dateF(value) replace `/` with `-` ) + ` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `F' + 
	'r`; 6 : `Sa`) )';
		end;
	end;
	with Items do
	begin
		AddItem('1/1/2001 10:00:00 AM');
		AddItem('1/2/2001 10:00:00 AM');
	end;
end
514
Is it possible to scroll the control's content by clicking and dragging

with Tree1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	AutoDrag := EXTREELib_TLB.exAutoDragScroll;
	EndUpdate();
end
513
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a snapshot
with Tree1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	HTMLPicture['p1'] := 'c:\exontrol\images\card.png';
	HTMLPicture['p2'] := 'c:\exontrol\images\sun.png';
	AutoDrag := EXTREELib_TLB.exAutoDragCopySnapShot;
	LinesAtRoot := EXTREELib_TLB.exNoLinesAtRoot;
	HasLines := EXTREELib_TLB.exThinLine;
	ShowFocusRect := False;
	DefaultItemHeight := 26;
	Columns.Add('Task');
	with Items do
	begin
		h := AddItem('<img>p1:32</img>Group 1');
		CellCaptionFormat[OleVariant(h),OleVariant(0)] := EXTREELib_TLB.exHTML;
		ItemDivider[h] := 0;
		ItemBold[h] := True;
		h1 := InsertItem(h,Null,'Task 1');
		h2 := InsertItem(h,Null,'Task 2');
		h3 := InsertItem(h,Null,'Task 3');
		h := AddItem('<img>p2:32</img>Group 2');
		CellCaptionFormat[OleVariant(h),OleVariant(0)] := EXTREELib_TLB.exHTML;
		ItemBold[h] := True;
		ItemDivider[h] := 0;
		h1 := InsertItem(h,Null,'Task');
		ExpandItem[0] := True;
	end;
	EndUpdate();
end
512
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a image

with Tree1 do
begin
	BeginUpdate();
	HTMLPicture['p1'] := 'c:\exontrol\images\card.png';
	HTMLPicture['p2'] := 'c:\exontrol\images\sun.png';
	var_HTMLPicture := HTMLPicture['aka1'];
	HeaderHeight := 24;
	DefaultItemHeight := 48;
	DrawGridLines := EXTREELib_TLB.exRowLines;
	GridLineColor := RGB(240,240,240);
	SelBackMode := EXTREELib_TLB.exTransparent;
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Columns.Item[OleVariant(0)].Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
	Columns.Item[OleVariant(0)].FormatColumn := 'value + ` <img>p` + (1 + (value mod 3 ) ) + `</img>`';
	Columns.Item[OleVariant(0)].Width := 112;
	Columns.Item[OleVariant(1)].Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(1);
	Columns.Item[OleVariant(2)].LevelKey := '1';
	Columns.Item[OleVariant(3)].LevelKey := '1';
	Columns.Item[OleVariant(4)].LevelKey := '1';
	AutoDrag := EXTREELib_TLB.exAutoDragCopyImage;
	SingleSel := False;
	with Items do
	begin
		h := ItemByIndex[1];
		SelectItem[h] := True;
		h := ItemByIndex[2];
		SelectItem[h] := True;
		h := ItemByIndex[3];
		SelectItem[h] := True;
		LockedItemCount[EXTREELib_TLB.BottomAlignment] := 1;
		h := LockedItem[EXTREELib_TLB.BottomAlignment,0];
		CellCaption[OleVariant(h),OleVariant(1)] := '<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, ...';
		CellSingleLine[OleVariant(h),OleVariant(1)] := EXTREELib_TLB.exCaptionWordWrap;
		CellCaptionFormat[OleVariant(h),OleVariant(1)] := EXTREELib_TLB.exHTML;
		CellHAlignment[OleVariant(h),OleVariant(1)] := EXTREELib_TLB.CenterAlignment;
		ItemDivider[h] := 1;
		ItemDividerLineAlignment[h] := EXTREELib_TLB.DividerTop;
	end;
	EndUpdate();
end
511
How can copy and paste the selection to Microsoft Word, Excel or any OLE compliant application, as a text

with Tree1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	ContinueColumnScroll := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Columns.Item[OleVariant(2)].LevelKey := '1';
	Columns.Item[OleVariant(3)].LevelKey := '1';
	Columns.Item[OleVariant(4)].LevelKey := '1';
	AutoDrag := EXTREELib_TLB.exAutoDragCopyText;
	SingleSel := False;
	with Items do
	begin
		h := ItemByIndex[1];
		SelectItem[h] := True;
		h := ItemByIndex[3];
		SelectItem[h] := True;
		h := ItemByIndex[4];
		SelectItem[h] := True;
		h := ItemByIndex[5];
		SelectItem[h] := True;
		LockedItemCount[EXTREELib_TLB.BottomAlignment] := 1;
		h := LockedItem[EXTREELib_TLB.BottomAlignment,0];
		CellCaption[OleVariant(h),OleVariant(0)] := '<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, Excel, ...';
		CellSingleLine[OleVariant(h),OleVariant(0)] := EXTREELib_TLB.exCaptionWordWrap;
		CellCaptionFormat[OleVariant(h),OleVariant(0)] := EXTREELib_TLB.exHTML;
		CellHAlignment[OleVariant(h),OleVariant(0)] := EXTREELib_TLB.CenterAlignment;
		ItemDivider[h] := 0;
		ItemDividerLineAlignment[h] := EXTREELib_TLB.DividerTop;
	end;
	EndUpdate();
end
510
Is it possible to change the indentation during the drag and drop

with Tree1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	AutoDrag := EXTREELib_TLB.exAutoDragPositionAny;
	LinesAtRoot := EXTREELib_TLB.exNoLinesAtRoot;
	HasLines := EXTREELib_TLB.exSolidLine;
	HasButtons := EXTREELib_TLB.exWPlus;
	ShowFocusRect := False;
	SelBackMode := EXTREELib_TLB.exTransparent;
	Columns.Add('Task');
	with Items do
	begin
		h := AddItem('Group 1');
		ItemBold[h] := True;
		ItemDivider[h] := 0;
		h1 := InsertItem(h,Null,'Task 1');
		h2 := InsertItem(h1,Null,'Task 2');
		h2 := InsertItem(h1,Null,'Task 3');
		h3 := InsertItem(h,Null,'Task 3');
		ExpandItem[h] := True;
		ExpandItem[h1] := True;
		h := AddItem('Group 2');
		ItemBold[h] := True;
		ItemDivider[h] := 0;
		LockedItemCount[EXTREELib_TLB.BottomAlignment] := 1;
		h := LockedItem[EXTREELib_TLB.BottomAlignment,0];
		CellCaption[OleVariant(h),OleVariant(0)] := 'Click a row, and move by dragging <b>up, down</b> to change the row''s parent or <b>left,right</b> to increase or decrease the in' + 
	'dentation.';
		CellSingleLine[OleVariant(h),OleVariant(0)] := EXTREELib_TLB.exCaptionWordWrap;
		CellCaptionFormat[OleVariant(h),OleVariant(0)] := EXTREELib_TLB.exHTML;
	end;
	EndUpdate();
end
509
Is it possible to allow moving an item to another, but keeping its indentation

with Tree1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	AutoDrag := EXTREELib_TLB.exAutoDragPositionKeepIndent;
	LinesAtRoot := EXTREELib_TLB.exNoLinesAtRoot;
	HasLines := EXTREELib_TLB.exThinLine;
	ShowFocusRect := False;
	Columns.Add('Task');
	with Items do
	begin
		h := AddItem('Group 1');
		ItemDivider[h] := 0;
		ItemBold[h] := True;
		h1 := InsertItem(h,Null,'Task 1');
		h2 := InsertItem(h,Null,'Task 2');
		h3 := InsertItem(h,Null,'Task 3');
		ExpandItem[h] := True;
		h := AddItem('Group 2');
		ItemBold[h] := True;
		ItemDivider[h] := 0;
	end;
	EndUpdate();
end
508
How can I change the row's position to another, by drag and drop. Is it possible

with Tree1 do
begin
	BeginUpdate();
	ShowFocusRect := False;
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	AutoDrag := EXTREELib_TLB.exAutoDragPosition;
	Columns.Add('Task');
	with Items do
	begin
		AddItem('Task 1');
		AddItem('Task 2');
		AddItem('Task 3');
		AddItem('Task 4');
	end;
	EndUpdate();
end
507
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area

with Tree1 do
begin
	BeginUpdate();
	ScrollBars := EXTREELib_TLB.exDisableBoth;
	ScrollPartVisible[EXTREELib_TLB.exVScroll,EXTREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXTREELib_TLB.exHScroll,EXTREELib_TLB.exExtentThumbPart] := True;
	ScrollPartVisible[EXTREELib_TLB.ScrollBarEnum($2),EXTREELib_TLB.exExtentThumbPart] := True;
	ScrollWidth := 4;
	Background[EXTREELib_TLB.exVSBack] := $f0f0f0;
	Background[EXTREELib_TLB.exVSThumb] := $808080;
	ScrollHeight := 4;
	Background[EXTREELib_TLB.exHSBack] := Background[EXTREELib_TLB.exVSBack];
	Background[EXTREELib_TLB.exHSThumb] := Background[EXTREELib_TLB.exVSThumb];
	Background[EXTREELib_TLB.exScrollSizeGrip] := Background[EXTREELib_TLB.exVSBack];
	EndUpdate();
end
506
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

with Tree1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	with Columns do
	begin
		with (IUnknown(Add('Car')) as EXTREELib_TLB.Column) do
		begin
			DisplayFilterButton := True;
			FilterType := EXTREELib_TLB.exFilter;
			Filter := 'MAZDA';
		end;
		with (IUnknown(Add('Equipment')) as EXTREELib_TLB.Column) do
		begin
			DisplayFilterButton := True;
			DisplayFilterPattern := False;
			CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*';
			FilterType := EXTREELib_TLB.exPattern;
			Filter := 'AIR BAG';
		end;
	end;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag';
		CellCaption[OleVariant(AddItem('Toyota')),OleVariant(1)] := 'Air Bag,Air condition';
		CellCaption[OleVariant(AddItem('Ford')),OleVariant(1)] := 'Air condition';
		CellCaption[OleVariant(AddItem('Nissan')),OleVariant(1)] := 'Air Bag,ABS,ESP';
		CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag, ABS,ESP';
		CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'ABS,ESP';
	end;
	ApplyFilter();
	EndUpdate();
end
505
How can I have a case-sensitive filter

with Tree1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	with Columns do
	begin
		with (IUnknown(Add('Car')) as EXTREELib_TLB.Column) do
		begin
			DisplayFilterButton := True;
			FilterType := Integer(EXTREELib_TLB.exFilterDoCaseSensitive) Or Integer(EXTREELib_TLB.exFilter);
			Filter := 'Mazda';
		end;
		with (IUnknown(Add('Equipment')) as EXTREELib_TLB.Column) do
		begin
			DisplayFilterButton := True;
			DisplayFilterPattern := False;
			CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*';
			FilterType := Integer(EXTREELib_TLB.exFilterDoCaseSensitive) Or Integer(EXTREELib_TLB.exPattern);
			Filter := 'Air Bag';
		end;
	end;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag';
		CellCaption[OleVariant(AddItem('Toyota')),OleVariant(1)] := 'Air Bag,Air condition';
		CellCaption[OleVariant(AddItem('Ford')),OleVariant(1)] := 'Air condition';
		CellCaption[OleVariant(AddItem('Nissan')),OleVariant(1)] := 'Air Bag,ABS,ESP';
		CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag, ABS,ESP';
		CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'ABS,ESP';
	end;
	ApplyFilter();
	EndUpdate();
end
504
I have several columns, but noticed that the filter is using AND between columns, but I need OR clause for filtering. Is it possible

with Tree1 do
begin
	BeginUpdate();
	LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('Item')) as EXTREELib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		Filter := 'Child 1';
		FilterType := EXTREELib_TLB.exFilter;
	end;
	with (IUnknown(Columns.Add('Date')) as EXTREELib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		DisplayFilterDate := True;
		FilterList := Integer(EXTREELib_TLB.exShowExclude) Or Integer(EXTREELib_TLB.exShowFocusItem) Or Integer(EXTREELib_TLB.exShowCheckBox) Or Integer(EXTREELib_TLB.exNoItems);
		Filter := '12/28/2010';
		FilterType := EXTREELib_TLB.exDate;
	end;
	FilterCriteria := '%0 or %1';
	Description[EXTREELib_TLB.exFilterBarOr] := '<font ;18><fgcolor=FF0000>or</fgcolor></font>';
	Description[EXTREELib_TLB.exFilterBarAnd] := '<font ;18><fgcolor=FF0000>and</fgcolor></font>';
	with Items do
	begin
		h := AddItem('Root 1');
		CellCaption[OleVariant(InsertItem(h,Null,'Child 1')),OleVariant(1)] := '12/27/2010';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 2')),OleVariant(1)] := '12/28/2010';
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		CellCaption[OleVariant(InsertItem(h,Null,'Child 1')),OleVariant(1)] := '12/29/2010';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 2')),OleVariant(1)] := '12/30/2010';
	end;
	ApplyFilter();
	EndUpdate();
end
503
Is it possible exclude the dates being selected in the drop down filter window

with Tree1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Date')) as EXTREELib_TLB.Column) do
	begin
		SortType := EXTREELib_TLB.SortDate;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		DisplayFilterDate := True;
		FilterList := Integer(EXTREELib_TLB.exShowExclude) Or Integer(EXTREELib_TLB.exShowFocusItem) Or Integer(EXTREELib_TLB.exShowCheckBox) Or Integer(EXTREELib_TLB.exNoItems);
	end;
	with Items do
	begin
		AddItem('12/27/2010');
		AddItem('12/28/2010');
		AddItem('12/29/2010');
		AddItem('12/30/2010');
		AddItem('12/31/2010');
	end;
	EndUpdate();
end
502
How can I display a calendar control inside the drop down filter window

with Tree1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Date')) as EXTREELib_TLB.Column) do
	begin
		SortType := EXTREELib_TLB.SortDate;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		DisplayFilterDate := True;
		FilterList := Integer(EXTREELib_TLB.exShowFocusItem) Or Integer(EXTREELib_TLB.exShowCheckBox) Or Integer(EXTREELib_TLB.exNoItems);
	end;
	with Items do
	begin
		AddItem('12/27/2010');
		AddItem('12/28/2010');
		AddItem('12/29/2010');
		AddItem('12/30/2010');
		AddItem('12/31/2010');
	end;
	EndUpdate();
end
501
Is it possible to include the dates as checkb-boxes in the drop down filter window

with Tree1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Dates')) as EXTREELib_TLB.Column) do
	begin
		SortType := EXTREELib_TLB.SortDate;
		DisplayFilterButton := True;
		DisplayFilterPattern := True;
		DisplayFilterDate := True;
		FilterList := Integer(EXTREELib_TLB.exShowFocusItem) Or Integer(EXTREELib_TLB.exShowCheckBox);
		Filter := 'to 12/27/2010';
		FilterType := EXTREELib_TLB.exDate;
	end;
	with Items do
	begin
		AddItem('12/27/2010');
		AddItem('12/28/2010');
		AddItem('12/29/2010');
		AddItem('12/30/2010');
		AddItem('12/31/2010');
	end;
	ApplyFilter();
	EndUpdate();
end